package cn.frh.controller;

import cn.frh.domain.Store;
import cn.frh.service.IStoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import util.JsonResult;

@RestController
@RequestMapping("/store")
public class StoreController {
    @Autowired
    private IStoreService storeService;
    @PostMapping("/add")
    public JsonResult add(@RequestBody Store store){
        storeService.add(store);
        return new JsonResult();
    }
}
